import Vue from 'vue'
import VueRouter from 'vue-router'
import About from "../views/About.vue"
import Map from "../views/Map.vue"
import Contact from "../views/Contact.vue"
import Map1 from "../views/Map1.vue"
import Index from "../views/Index.vue"
import News from "../views/News.vue"
import Product from "../views/Product.vue"
import Service from "../views/Service.vue"
import News_show from "../views/News_show.vue"
import Login from "../views/Login"
import Reg from "../views/Reg"

Vue.use(VueRouter)

const routes = [
  {
    path: '/newsShow/:id',
    name: 'News_show',
    component: News_show
  },
  {
    path: '/contact',
    name: 'Contact',
    component: Contact
  },
  {
    path: '/service',
    name: 'Service',
    component: Service
  },
  {
    path: '/product',
    name: 'Product',
    component: Product
  },
  {
    path: '/about',
    name: 'About',
    component: About
  },
  {
    path: '/',
    name: 'Index',
    component: Index
  },
  {
    path: '/map',
    name: 'Map',
    component: Map
  },
  {
    path: '/map1',
    name: 'Map1',
    component: Map1
  },
  {
    path: '/news',
    name: 'News',
    component: News
  },
  {
    path: '/login',
    name: 'Login',
    component: Login
  },
  {
    path: '/reg',
    name: 'Reg',
    component: Reg
  }
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
